package com.gxuwz.PangGuangyao.business.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.PangGuangyao.business.dao.SysRepairDAO;
import com.gxuwz.PangGuangyao.business.entity.SysRepair;
import com.gxuwz.core.pagination.Result;

@Service("sysRepairService")
public class SysRepairServiceImpl implements ISysRepairService {
	@Autowired
	private SysRepairDAO sysRepairDAO;

	@Override
	public Result<SysRepair> findAll(int page, int row,String logtype) {
		return sysRepairDAO.find(page, row, logtype);
	}
	
	@Override
	public SysRepair findById(Integer id) {
		return sysRepairDAO.get(SysRepair.class, id);
	}

	@Override
	public void delete(Integer id) {
		sysRepairDAO.remove(findById(id));		
	}
	
	@Override
	public void add(SysRepair sysRepair) {
		sysRepairDAO.save(sysRepair);
		
	}

	public void update(Integer id) {
		sysRepairDAO.update(findById(id));
		
	}

}
